﻿#light

/// <summary>
/// Defines an existing interface that needs adapting.
/// </summary>
type Adaptee() =
    member this.SpecificRequest() =
        printfn "Called SpecificRequest()"

/// <summary>
/// Defines the domain-specific interface that Client uses.
/// </summary>
type Target() =
    abstract Request : unit -> unit
    default this.Request() =
        printfn "Called Target Request()"

/// <summary>
/// Adaps the interface Adaptee to the Target interface.
/// </summary>
type Adapter() =
    inherit Target()
    
    let adaptee = Adaptee()

    override this.Request() =
        // Possibly do some other work
        // and then call SpecificRequest
        adaptee.SpecificRequest()

